// Bus.h

#ifndef		BUS_H
#define		BUS_H

#include	<stdint.h>

#define		BUS_LOW		0x00
#define		BUS_HIGH	0xFF
#define		BUS_OUTPUT	0x00
#define		BUS_INPUT	0xFF


struct sBus{
	uint8_t pin0;
	volatile uint16_t *port;
	volatile uint16_t *tris;
	volatile uint16_t *lat;
};

uint8_t	BusOpen( struct sBus *this, uint8_t dir, uint8_t value );
uint8_t	BusClose( struct sBus *this );
uint8_t	BusRead( struct sBus *this );
void 	BusWrite( struct sBus *this, uint8_t value );
void	BusDir( struct sBus *this, uint8_t dir );

#endif		//#ifndef		BUS_H
